package com.rightsidetech.system.dtos.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Author: yhr
 * @Date: 2021-09-22 18:07
 */
@Data
public class AppInsertReq extends AppUpdateReq implements Serializable {
    @ApiModelProperty(value = "更新用",hidden = true)
    private Long id;
    @ApiModelProperty(value = "上传地址",required = true)
    @NotBlank(message = "上传地址不能为空")
    @Length(max = 255, message = "上传地址最长255位")
    @Pattern(regexp = "^$|[\\u4e00-\\u9fa5a-zA-Z0-9_!@#$%^&*?.,:;\\-/]+", message = "上传地址不能输入特殊字符")
    private String url;
    @ApiModelProperty(value = "md5",required = true)
    @NotBlank(message = "md5不能为空")
    @Length(max = 200, message = "md5最长200位")
    @Pattern(regexp = "^[0-9a-zA-Z]+$", message = "md5不能含有特殊字符和中文")
    private String md5;
}
